package com.kaibo.redis.queue.component;

import com.kaibo.redis.queue.message.MessageConsumer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author: kaibo
 * @date: 2021/1/9 14:18
 * @GitHub: https://github.com/yuxuelian
 * @qq: 568966289
 * @description:
 */


@Slf4j
@Component
public class SpringRunningListener implements CommandLineRunner {

    @Autowired
    MessageConsumer messageConsumer;

    @Override
    public void run(String... args) throws Exception {
        messageConsumer.onMessage();
        log.info("application started");

    }

}

